package chan.project.smartlawdatamanage.service;

import chan.project.smartlawmodel.dto.lawregulation.LawRegulationQueryRequest;
import chan.project.smartlawmodel.entity.LawRegulation;
import chan.project.smartlawmodel.vo.LawRegulationVO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import jakarta.servlet.http.HttpServletRequest;


/**
 * 法律法规信息服务
 *
 * @author <a href="https://github.com/kavansp">kavansp</a>
 * @from <a href="https://www.code-nav.cn">编程导航学习圈</a>
 */
public interface LawRegulationService extends IService<LawRegulation> {

    /**
     * 校验数据
     *
     * @param lawRegulation
     * @param add 对创建的数据进行校验
     */
    void validLawRegulation(LawRegulation lawRegulation, boolean add);

    /**
     * 获取查询条件
     *
     * @param lawRegulationQueryRequest
     * @return
     */
    QueryWrapper<LawRegulation> getQueryWrapper(LawRegulationQueryRequest lawRegulationQueryRequest);

    /**
     * 分页获取法律法规信息封装
     *
     * @param lawRegulationPage
     * @param request
     * @return
     */
    Page<LawRegulationVO> getLawRegulationVOPage(Page<LawRegulation> lawRegulationPage, HttpServletRequest request);
}
